package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.pojos.WmNewsMaterial;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@Mapper
public interface WmNewsMaterialMapper extends BaseMapper<WmNewsMaterial> {
    /**
     *
     * @param newsId 文章id
     * @param materialIds 文章关联的素材id
     * @param type 关联类型 0 内容引用 1 封面引用
     */
    public void saveRelations(@Param("newsId") Integer newsId, @Param("materialIds") List<Integer> materialIds, @Param("type")short type);
}
